<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>头头加油！</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Microsoft YaHei', sans-serif;
            background: linear-gradient(135deg, #ff6b9d 0%, #c44569 100%);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }

        .container {
            background: rgba(255, 255, 255, 0.95);
            border-radius: 20px;
            padding: 40px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            text-align: center;
            max-width: 800px;
            width: 100%;
        }

        h1 {
            color: #e74c3c;
            font-size: 3em;
            margin-bottom: 30px;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
            animation: bounce 1s ease-in-out infinite alternate;
        }

        @keyframes bounce {
            from { transform: translateY(0); }
            to { transform: translateY(-10px); }
        }

        .photos-section {
            display: flex;
            justify-content: space-around;
            align-items: center;
            margin: 40px 0;
            flex-wrap: wrap;
            gap: 30px;
        }

        .photo-container {
            position: relative;
            transition: transform 0.3s ease;
        }

        .photo-container:hover {
            transform: scale(1.05);
        }

        .photo {
            width: 250px;
            height: 250px;
            border-radius: 50%;
            object-fit: cover;
            border: 5px solid #fff;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        .photo-label {
            margin-top: 15px;
            font-size: 1.2em;
            color: #333;
            font-weight: bold;
        }

        .heart-section {
            margin: 40px 0;
        }

        .heart {
            display: inline-block;
            position: relative;
            width: 100px;
            height: 90px;
            animation: heartbeat 1.2s ease-in-out infinite;
        }

        .heart:before,
        .heart:after {
            position: absolute;
            content: "";
            left: 50px;
            top: 0;
            width: 50px;
            height: 80px;
            background: #e74c3c;
            border-radius: 50px 50px 0 0;
            transform: rotate(-45deg);
            transform-origin: 0 100%;
        }

        .heart:after {
            left: 0;
            transform: rotate(45deg);
            transform-origin: 100% 100%;
        }

        @keyframes heartbeat {
            0% { transform: scale(1); }
            14% { transform: scale(1.3); }
            28% { transform: scale(1); }
            42% { transform: scale(1.3); }
            70% { transform: scale(1); }
        }

        .cheering-text {
            font-size: 2em;
            color: #e74c3c;
            margin: 30px 0;
            font-weight: bold;
            text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
        }

        .sparkles {
            position: absolute;
            width: 100%;
            height: 100%;
            pointer-events: none;
        }

        .sparkle {
            position: absolute;
            width: 4px;
            height: 4px;
            background: #ffd700;
            border-radius: 50%;
            animation: sparkle 2s linear infinite;
        }

        @keyframes sparkle {
            0% {
                opacity: 0;
                transform: translateY(0) scale(0);
            }
            50% {
                opacity: 1;
                transform: translateY(-20px) scale(1);
            }
            100% {
                opacity: 0;
                transform: translateY(-40px) scale(0);
            }
        }

        .upload-btn {
            background: #e74c3c;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 1em;
            margin-top: 10px;
            transition: background 0.3s ease;
        }

        .upload-btn:hover {
            background: #c0392b;
        }

        @media (max-width: 768px) {
            .photos-section {
                flex-direction: column;
            }
            
            h1 {
                font-size: 2em;
            }
            
            .photo {
                width: 200px;
                height: 200px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <h1>🏓 头头加油！ 🏓</h1>
        
        <div class="photos-section">
            <div class="photo-container">
                <img id="friendPhoto" src="https://via.placeholder.com/250x250/FF6B6B/FFFFFF?text=你朋友" alt="朋友照片" class="photo">
                <div class="photo-label">郭烨</div>
                <input type="file" id="friendUpload" accept="image/*" style="display: none;">
                <button class="upload-btn" onclick="document.getElementById('friendUpload').click()">上传朋友照片</button>
            </div>
            
            <div style="display: flex; align-items: center;">
                <span style="font-size: 3em; color: #e74c3c;">💪</span>
            </div>
            
            <div class="photo-container">
                <img id="wangPhoto" src="https://via.placeholder.com/250x250/4ECDC4/FFFFFF?text=王楚钦" alt="王楚钦照片" class="photo">
                <div class="photo-label">王楚钦</div>
                <input type="file" id="wangUpload" accept="image/*" style="display: none;">
                <button class="upload-btn" onclick="document.getElementById('wangUpload').click()">上传王楚钦照片</button>
            </div>
        </div>
        
        <div class="cheering-text">
            头头加油！我们永远支持你！
        </div>
        
        <div class="heart-section">
            <div class="heart"></div>
        </div>
        
        <div class="cheering-text">
            ❤️ 爱你哟 ❤️
        </div>
    </div>

    <div class="sparkles" id="sparkles"></div>

    <script>
        // 文件上传处理
        document.getElementById('friendUpload').addEventListener('change', function(e) {
            handleFileUpload(e, 'friendPhoto');
        });

        document.getElementById('wangUpload').addEventListener('change', function(e) {
            handleFileUpload(e, 'wangPhoto');
        });

        function handleFileUpload(event, imageId) {
            const file = event.target.files[0];
            if (file && file.type.startsWith('image/')) {
                const reader = new FileReader();
                reader.onload = function(e) {
                    document.getElementById(imageId).src = e.target.result;
                };
                reader.readAsDataURL(file);
            }
        }

        // 创建闪烁效果
        function createSparkle() {
            const sparkle = document.createElement('div');
            sparkle.className = 'sparkle';
            sparkle.style.left = Math.random() * 100 + '%';
            sparkle.style.top = Math.random() * 100 + '%';
            sparkle.style.animationDelay = Math.random() * 2 + 's';
            
            document.getElementById('sparkles').appendChild(sparkle);
            
            setTimeout(() => {
                sparkle.remove();
            }, 2000);
        }

        // 定期创建闪烁效果
        setInterval(createSparkle, 500);

        // 添加点击爱心特效
        document.querySelector('.heart').addEventListener('click', function() {
            this.style.animation = 'none';
            setTimeout(() => {
                this.style.animation = 'heartbeat 1.2s ease-in-out infinite';
            }, 10);
            
            // 创建多个闪烁
            for(let i = 0; i < 10; i++) {
                setTimeout(createSparkle, i * 100);
            }
        });

        // 添加鼠标悬停音效（可选）
        const heart = document.querySelector('.heart');
        heart.addEventListener('mouseenter', function() {
            this.style.transform = 'scale(1.2)';
        });

        heart.addEventListener('mouseleave', function() {
            this.style.transform = 'scale(1)';
        });
    </script>
</body>
</html>